<template>
  <h1>下拉框组件</h1>
  <el-select placeholder="请选择你喜欢的城市" style="width: 50%" v-model="city">
    <el-option label="上海" value="上海"></el-option>
    <el-option label="北京" value="北京"></el-option>
    <el-option label="广州" value="广州"></el-option>
    <el-option label="深圳" value="深圳"></el-option>
  </el-select>
  <h4>选择的城市为 ：{{city}}</h4>
</template>

<script setup>
  import {ref} from "vue";

  const city=ref('深圳');
</script>

<style scoped>

</style>